Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submit completed builds #50

Merged
merged 15 commits into from
Mar 1, 2024
Merged

Submit completed builds #50

merged 15 commits into from
Mar 1, 2024

Conversation

Pabl0cks
Copy link
Member

@Pabl0cks Pabl0cks commented Feb 28, 2024

Description

Tried to follow the same logic than current status changes.

  • Created a button with a modal in /my-grants for the user to submit the build of their active grant. Tried different designs, not so happy with it, could ask Andrea for a future iteration.
  • Added notifications when submitting, and logic to save submittedAt timestamp.
  • Added link to grant card in /admin page, not very fancy link, only underlined text to the right of grant title.
  • Wanted to use a stackoverflow simple URL validation but did not find any that I was happy with, so is chatgpt crafted. Take a special look at it at the review 👀

Feel free to push any changes that you see necessary, or let me know if you prefer me to do them ♥🙌

Closes #6

Copy link

vercel bot commented Feb 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
grants-bg ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 1, 2024 4:05pm

@technophile-04
Copy link
Member

technophile-04 commented Feb 29, 2024

Hey tysm Pablo !! This is great, will push some commits 🙌!

We also need to add authorization that only the creator of that grant can update link, I think we missed it

We also missed the signing of the message part, If we we don't add that part anyone can impersonate anyone's address and submit on behalf of them.

So we need to sign EIP712 message on frontend and also verify it on backend. Similar to the flow how we have it for /applypage.

@technophile-04
Copy link
Member

technophile-04 commented Feb 29, 2024

Update few things:

  • Moved modal to its separate component
    • We could in future PR's refactor it more on UI side if needed / use dasiyUI modal but... looks great for now
  • Added EIP712 signature auth
  • Added more authorization (lol just to be sure someone does not send bad req with Postman) :
    • Only can be submitted if it was approved
    • Only grant owner can submit it

Copy link
Contributor

@carletex carletex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff @technophile-04 & @Pabl0cks !!

@carletex carletex merged commit bd33702 into main Mar 1, 2024
3 checks passed
@carletex carletex deleted the submit-completed-builds branch March 1, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project completed submission form /grants/{database_id}/submit
3 participants